
############在controller2安装配置############
#安装
yum install -y openstack-neutron openstack-neutron-ml2 \
 openstack-neutron-linuxbridge python-neutronclient ebtables ipset

#同步controller1配置并修改
Node=controller2
rsync -avzP -e 'ssh -p 22' controller1:/etc/nova/* /etc/nova/
rsync -avzP -e 'ssh -p 22' controller1:/etc/neutron/* /etc/neutron/
sed -i "s/controller1/$Node/" /etc/nova/nova.conf
sed -i "s/controller1/$Node/" /etc/neutron/neutron.conf
rsync -avzP -e 'ssh -p 22' controller1:/etc/haproxy/* /etc/haproxy/


#重启相关服务
systemctl restart haproxy openstack-nova-api.service
#启动neutron
systemctl enable neutron-server.service \
 neutron-linuxbridge-agent.service neutron-dhcp-agent.service \
 neutron-metadata-agent.service
systemctl start neutron-server.service \
 neutron-linuxbridge-agent.service neutron-dhcp-agent.service \
 neutron-metadata-agent.service


source ~/admin-openstack.sh
openstack network agent list